package com.wei.wiki.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

/*
 * @author : ShunWei
 * @date : 2022/1/29 11:53
 * @Description:
 */
@ApiModel("分页请求类")
public class PageReq {
    @NotNull(message = "页码不能为空")
    @ApiModelProperty(value="页码", example="1", required= true)
    private int page;

    @NotNull(message ="页面大小不能为空")
    @Max(value = 1000, message ="【页面大小】不能超过1000")
    @ApiModelProperty(value="页面大小", example="10", required= true)
    private int size;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }
}
